/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.alphawavesgames.engine.rendering;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import javax.microedition.khronos.opengles.GL10;

/**
 *
 * @author duncan
 */
public class ShapeRendererAndroid extends ShapeRenderer
{
    private Canvas  m_canvas;
    private Paint   m_paint;
    private GL10    m_gl;

    public ShapeRendererAndroid()
    {
        m_canvas = null;
        m_paint = new Paint();
        m_paint.setColor( Color.WHITE );
        m_gl = null;
    }

    public void setCanvas( Canvas canvas )
    {
        m_canvas = canvas;
    }

    public void setGL( GL10 gl )
    {
        m_gl = gl;
    }

    public void drawLine( int startPosX, int startPosY, int endPosX, int endPosY )
    {
        m_canvas.drawLine( startPosX, startPosY, endPosX, endPosY, m_paint );
    }

    public void drawRect( int left, int top, int width, int height )
    {
        m_canvas.drawRect( left, top, left + width, top + height, m_paint );
    }

    public void setColour( int col )
    {
        m_paint.setColor( col );
    }

    public void setARGB( int A, int R, int G, int B )
    {
        m_paint.setARGB( A, R, G, B );
    }
}
